#ifndef MEETINGMANAGER_H
#define MEETINGMANAGER_H

#include <QObject>
#include <QString>
#include <QList>
#include <QUuid>
#include <QRandomGenerator>


class Meeting {
public:
    QString id;
    QString multicastIp;
    int multicastPort;
    QStringList participants;
};

class MeetingManager : public QObject {
    Q_OBJECT
public:
    static MeetingManager* instance();
    QString createMeeting();
    bool joinMeeting(const QString &id, const QString &user);
    Meeting getMeetingInfo(const QString &id);


private:
    QList<Meeting> meetings;
    static MeetingManager* m_instance;
    MeetingManager(QObject *parent = nullptr); // 私有构造函数
    QString generateMulticastIp();
    int generateMulticastPort();
};

#endif // MEETINGMANAGER_H
//#ifndef MEETINGMANAGER_H
//#define MEETINGMANAGER_H

//#include <QObject>

//class MeetingManager : public QObject
//{
//    Q_OBJECT
//public:
//    explicit MeetingManager(QObject *parent = nullptr);

//signals:

//};

//#endif // MEETINGMANAGER_H
